from po.base_page import BasePage
from selenium.webdriver.common.by import By


class Registerpage(BasePage):
    _name_input = By.CSS_SELECTOR, 'input[id="loginname"]'
    _paswd_input = By.CSS_SELECTOR, 'input[name="pass"]'
    _repasswd_input = By.CSS_SELECTOR, 'input[name="re_pass"]'
    _email_input = By.CSS_SELECTOR, 'input[name="email"]'

    def register_with_four(self, username, passwd, repasswd, email):
        self._driver.find_element(*self._name_input).send_keys(username)
        self._driver.find_element(*self._paswd_input).send_keys(passwd)
        self._driver.find_element(*self._repasswd_input).send_keys(repasswd)
        self._driver.find_element(*self._email_input).send_keys(email)
